<?php

require_once 'PipesImpl/Uri.php';

class Pipes_Uri implements PipesImpl_Uri
{
    private $_controller = '';
    private $_action = '';
    private $_extras = array();
    
    public function __construct($controller, $action, $extras = array()) {
        $this->_controller = $controller;
        $this->_action = $action;
        $this->_extras = $extras;
    }
    
    public function __get($key) {
        switch ($key) {
            case 'extras' :
            case 'action' :
            case 'controller' :
                $name = "_{$key}";
                return $this->$name;
                break;
            
        }
    }
    
    public function __isset($key) {
        $name = "_{$key}";
        return isset($this->$name);
    }
}
